package com.infinitegroup.findmystuff.models;

import java.util.List;
import java.util.Map;

/**
 * Interface that contains the methods needed to interact with user accounts.
 * @author Danielle
 *
 */
public interface Account {
	
	/**
	 * Deactivates this "current" account.
	 */
	public void deactivate();
	
	public boolean isActive();
	public boolean isAdmin();
	public boolean changePassword(String newPassword);
	public boolean register(String firstName, String lastName, String username, String password, String email, String phone, String zipCode);
	
	public long deleteItem(String itemid);
	public String getFirstName();
	public String getLastName();
	public String getPassword();
	public String getEmail();
	public String getUsername();
	public String getPhone();
	public String getZipcode();
	public String getId();
	public String request(String itemID);
	
	
	/**
	 * Checks whether a superadmin has been created or not. Creates one if hasn't.
	 */
	public void checkSuperAdmin();
	
	/**
	 * Checks to see if the inputed account exists.
	 * @param username Username for account.
	 * @return If the account exists or not.
	 */
	public boolean exists(String username);
	
	/**
	 * Refreshes the existing account link and updates fields with information of this new username.
	 * @param username
	 */
	public void refresh(String username);
	
	/**
	 * Gets all items associated with this account.
	 * @return
	 */
	public List<Map<String, String>> getAccountItems();
}
